package com.prothink.controller;

import com.prothink.entity.JsCourseRecord;
import com.prothink.entity.RequestData;
import com.prothink.service.JsCourseRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName : JsCourseRecordController  //类名
 * @Description : 商品审核表MVC  //描述
 * @Author : Zhang //作者
 * @Date: 12/12  23:06
 */
@CrossOrigin
@RestController
@RequestMapping("jsCourseRecord")
public class JsCourseRecordController {
    @Autowired
    private JsCourseRecordService courseRecordService;

    @RequestMapping("/getRecord")
    public RequestData getRecord(JsCourseRecord courseRecord){
        List<JsCourseRecord> recordList = courseRecordService.getRecord(courseRecord);
        return recordList!=null?RequestData.buildSuccess(recordList):RequestData.buildError("服务端错误");
    }
}
